<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:67:"D:\wamp\www\s58\tp5\public/../application/admin\view\user\adit.html";i:1488876314;s:77:"D:\wamp\www\s58\tp5\public/../application/admin\view\Dashboard\dashboard.html";i:1489042419;}*/ ?>
﻿<!DOCTYPE html>
<html lang="">
<head>
	<meta charset="utf-8">
	<title>Retina Dashboard</title>
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
	<link rel="stylesheet" href="__QCSS__/stylel.css" media="all" />
	
	<!--[if IE]><link rel="stylesheet" href="css/ie.css" media="all" /><![endif]-->
	<!--[if lt IE 9]><link rel="stylesheet" href="css/lt-ie-9.css" media="all" /><![endif]-->
</head>
<body>
<div class="testing">
<header class="main">
	<h1><strong>这个小</strong> 博客</h1>
	<input type="text" value="search" />
</header>
<section class="user">
	<div class="profile-img">
		<p><img src="__IMG__/uiface2.png" alt="" height="40" width="40" /> [<?php session_start();
	 echo $_SESSION['admin']['nickname'];?>]用户</p>
	</div>
	<div class="buttons">
		<button class="ico-font">&#9206;</button>
		<span class="button dropdown">
			<a href="#">Notifications <span class="pip">4</span></a>
			<ul class="notice">
				<li>
					<hgroup>
						<h1>You have a new task</h1>
						<h2>Report web statistics week by week.</h2> 
					</hgroup>
					<p><span>14:24</span></p>
				</li>
				<li>
					<hgroup>
						<h1>New comment</h1>
						<h2>Comment on <em>About page</em> by Darren.</h2> 
					</hgroup>
					<p><span>11:04</span></p>
				</li>
				<li>
					<hgroup>
						<h1>Broken link</h1>
						<h2>We've spotted a broken link on the <em>Blog page</em>.</h2> 
					</hgroup>
					<p><span>10:46</span></p>
				</li>
				<li>
					<hgroup>
						<h1>User report</h1>
						<h2><em>Lee Grant</em> has been promoted to admin.</h2> 
					</hgroup>
					<p><span>09:57</span></p>
				</li>
			</ul>
		</span> 
		<span class="button dropdown">
			<a href="#">Inbox <span class="pip">6</span></a>
			<ul class="notice">
				<li>
					<hgroup>
						<h1>Hi, I need a favour</h1>
						<h2>John Doe</h2>
						<h3>Lorem ipsum dolor sit amet, consectetuer sed aidping putamus delo de sit felume...</h3>
					</hgroup>
					<p><span>11:24</span></p>
				</li>
				<li>
					<hgroup>
						<h1><span class="icon">&#59154;</span>Hi, I need a favour</h1>
						<h2>John Doe</h2>
						<h3>Lorem ipsum dolor sit amet, consectetuer sed aidping putamus delo de sit felume...</h3>
					</hgroup>
					<p><span>11:24</span></p>
				</li>
				<li>
					<hgroup>
						<h1><span class="icon">&#59154;</span>Hi, I need a favour</h1>
						<h2>John Doe</h2>
						<h3>Lorem ipsum dolor sit amet, consectetuer sed aidping putamus delo de sit felume...</h3>
					</hgroup>
					<p><span>11:24</span></p>
				</li>
			</ul>
		</span> 
		<span class="button">帮助</span>
		<span class="button blue"><a href="<?php echo url('login/goout'); ?>">退出</a></span>
	</div>
</section>
</div>
<nav>
	<ul>
		<li class="section"><a href="<?php echo url('Admin/dashboard/dashboard'); ?>"><span class="icon">&#128711;</span> 主页</a></li>
		<li>
			<a href="<?php echo url('Admin/works/works'); ?>"><span class="icon">&#128196;</span> 作品管理</a>
			<ul class="submenu">
				<li><a href="">添加文章</a></li>
				<li><a href="<{}>">修改文章</a></li>
			</ul>	
		</li>
		<li>
			<a href="<?php echo url('Admin/image/image'); ?>"><span class="icon">&#127748;</span> 相册<span class="pip">7</span></a>
			<ul class="submenu">
				<li><a href="">上传相片</a></li>
				<li><a href="<?php echo url('Admin/image/album'); ?>">新建相册</a></li>
			</ul>
		</li>
		<li>
			<?php $id = $_SESSION['admin']['tel'];?>
			<a href="<?php echo url('Admin/Inform/inform','id='.$id); ?>"><span class="icon">&#59160;</span> 个人信息管理 <span class="pip">12</span></a>
			<ul class="submenu">
				<li><a href="blog-new.html">修改个人信息</a></li>
				<li><a href="blog-table.html">头像修改</a></li>
			</ul>
		</li>
		<li>
			<a href=""><span class="icon">&#128101;</span> 用户管理</a>
			<ul class="submenu">
				<li><a href="<?php echo url('Admin/User/add'); ?>">添加用户</a></li>
				<li><a href="<?php echo url('Admin/user/index'); ?>">后台用户</a></li>
			</ul>
		</li>
		<li><a href="<?php echo url('Admin/user/user'); ?>"><span class="icon">&#9881;</span> 好友管理<span class="pip">3</span></a></li>
		
	</ul>
</nav>

<section class="alert">
	<div class="green">	
		<p><a href="#">添加新用户</a></p>
		<span class="close">&#10006;</span>
	</div>
</section>

<section class="content">

			<?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
			<div style="padding-top: 30px"></div>
	<form class="form-horizontal" method="post" action="<?php echo url('User/update'); ?>" name="regForm" onsubmit="return checkForm()">
		<div class="form-group">
		    <label for="inputEmail3" class="col-sm-2 control-label">昵称</label>
		    <div class="col-sm-5" style="display: inline-block;">
		      <input type="text" class="form-control" id="inputEmail3" onblur="checkUser()"  name="nickname"  value="<?php echo $vo['nickname']; ?>">
		      <input type="hidden" name='id' value='<?php echo $vo['id']; ?>'>
			</div>
			<span for="inputEmail3" class="col-sm-5 control-label" style="text-align: left" id="utab">* 必填项,请输入昵称(2-15位,数字字母下划线且必须由字母中文开头)</span>
		</div>
	  	<div class="form-group">
		    <label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>
		    <div class="col-sm-5" style="display: inline-block;">
		      <input type="email" class="form-control" id="inputEmail3" onblur="checkEmail()" name="email"  value="<?php echo $vo['email']; ?>">
			</div>
			<span for="inputEmail3" class="col-sm-5 control-label" style="text-align: left" id="etab">* 必填项,请输入常用邮箱</span>
		</div>
		<div class="form-group">
		    <label for="inputEmail3" class="col-sm-2 control-label">电话</label>
		    <div class="col-sm-5" style="display: inline-block;">
		      <input type="text" class="form-control" id="inputEmail3" onblur="checkPhone()" name="tel"   maxlength="11" value="<?php echo $vo['tel']; ?>">
			</div>
			<span for="inputEmail3" class="col-sm-5 control-label" style="text-align: left" id="teltab">* 必填项,请输入常用手机号码</span>
		</div>
		<div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10">
		      <button type="submit" class="btn btn-default">确认修改</button>
		    </div>
		</div>
	</form>
<?php endforeach; endif; else: echo "" ;endif; ?>
	<!-- 表单失焦验证 -->
	<script>
		//邮箱
        function checkEmail(){
            var email = document.regForm.email.value;
            var etab = document.getElementById('etab');

            if (email.match(/^[\w-]+@[\w-]+(\.\w+){1,3}$/) == null) {
                etab.innerHTML = "* 邮箱格式不正确";
                etab.style.color = "#f00";
                return false;
            }else{
                etab.innerHTML = "* 通过验证!";
                etab.style.color = "#0a0";
                return true;
            }
        }
         //用户
        function checkUser(){
            var user = document.regForm.nickname.value;
            var utab = document.getElementById('utab');

            if (user.match(/^[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9_\u4E00-\u9FA5]{1,15}$/) == null) {
                utab.innerHTML = "* 用户名必须是: 2-15位,数字字母下划线且必须由字母中文开头";
                utab.style.color = "#f00";
                return false;
            }else{
                utab.innerHTML = "* 通过验证!";
                utab.style.color = "#0a0";
                return true;
            }
        }
        //手机
        function checkPhone(){
            var phone = document.regForm.tel.value;
            var teltab = document.getElementById('teltab');

  

            if (phone.match(/^1(3|4|5|7|8)\d{9}$/) == null) {
                teltab.innerHTML = "* 手机号必须是: 11位纯数字且合法";
                teltab.style.color = "#f00";
                return false;
            }else{
                teltab.innerHTML = "* 通过验证!";
                teltab.style.color = "#0a0";
                return true;
            }
        }
        //密码
        function checkPass(){
            var pass = document.regForm.pwd.value;
            var ptab = document.getElementById('ptab');

            if (pass.length < 6 || pass.length > 18 ) {
                ptab.innerHTML = "* 密码不合法,必须是6-18位";
                ptab.style.color = "#f00";
                return false;
            }else{
                ptab.innerHTML = "* 通过验证!";
                ptab.style.color = "#0a0";
                return true;
            }
        }

        //密码
        function checkRepass(){
            var pass = document.regForm.pwd.value;
            var repass = document.regForm.repwd.value;
            var rptab = document.getElementById('rptab');

            if (pass !== repass) {
                rptab.innerHTML = "* 两次密码不一致";
                rptab.style.color = "#f00";
                return false;
            }else{
                rptab.innerHTML = "* 通过验证!";
                rptab.style.color = "#0a0";
                return true;
            }
        }

        function checkForm(){
            return checkEmail() && checkUser() && checkPass() && checkRepass() && checkPhone();
        }
	</script>

</section>

<script src="__JQ__/jquery-1.6.4/jquery.min.js"></script>
<script src="__JQ__/js/jquery.wysiwyg.js"></script>
<script src="__JQ__/js/custom.js"></script>
<script src="__JQ__/js/cycle.js"></script>
<script src="__JQ__/js/jquery.checkbox.min.js"></script>
<script src="__JQ__/js/flot.js"></script>
<script src="__JQ__/js/flot.resize.js"></script>
<script src="__JQ__/js/flot-time.js"></script>
<script src="__JQ__/js/flot-pie.js"></script>
<script src="__JQ__/js/flot-graphs.js"></script>
<script src="__JQ__/js/cycle.js"></script>
<script src="__JQ__/js/jquery.tablesorter.min.js"></script>

	

<script type="text/javascript">

// Feature slider for graphs
$('.cycle').cycle({
	fx: "scrollHorz",
	timeout: 0,
    slideResize: 0,
    prev:    '.left-btn', 
    next:    '.right-btn'
});
</script>
</body>
</html>